From 9329e6405d0936b900bf095cba6dbc74fb8c07c8 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Sun, 23 Oct 2005 16:51:47 +0100 Subject: [PATCH] Fix an issue for passing arguement from control panel to deivce model for some arguemnt like 'localtime', 'isa', device model need an argument "-localtime", instead of "-localtime 1" Signed-off-by: Xiaofeng Ling --- tools/python/xen/xend/image.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/python/xen/xend/image.py b/tools/python/xen/xend/image.py index ee57bba5da..6cd9f540f3 100644 --- a/tools/python/xen/xend/image.py +++ b/tools/python/xen/xend/image.py @@ -243,11 +243,12 @@ class VmxImageHandler(ImageHandler): # Handle booleans gracefully if a in ['localtime', 'std-vga', 'isa', 'nic-ne2000']: if v != None: v = int(v) - + if v: ret.append("-%s" % a) + else: + if v: + ret.append("-%s" % a) + ret.append("%s" % v) log.debug("args: %s, val: %s" % (a,v)) - if v: - ret.append("-%s" % a) - ret.append("%s" % v) # Handle disk/network related options for (name, info) in deviceConfig: -- 2.30.2